package steffens.java.gui.defaultui.interactive.buttons;

import java.awt.Dimension;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;

public class DefaultButton extends JButton{

	private static final long serialVersionUID = 1L;
	public static final Dimension DEFAULT_SIZE = new Dimension(32,128);
	public static final Icon DEFAULT_ICON = new ImageIcon();
	public static final String DEFAULT_TEXT = "DEFAULT";
		
	/**
	 * 
	 */
	public DefaultButton() {
		this("OK", DEFAULT_ICON, DEFAULT_SIZE);
	}

	/**
	 * @param text
	 */
	public DefaultButton(String text) {
		this(text, DEFAULT_ICON, DEFAULT_SIZE);
	}
	
	/**
	 * @param icon
	 */
	public DefaultButton(Icon icon) {
		this(DEFAULT_TEXT, icon, DEFAULT_SIZE);
	}
	
	/**
	 * @param size
	 */
	public DefaultButton(Dimension size) {
		this(DEFAULT_TEXT, DEFAULT_ICON, size);
	}
	
	/**
	 * @param text
	 * @param icon
	 * @param size
	 */
	public DefaultButton(String text, Icon icon, Dimension size) {
		super(text, icon);
		this.setSize(size.width, size.height);
		this.setPreferredSize(size);
		this.setVisible(true);
	}
	
	public void setText(String text){
		super.setText(text);
	}
	public void setDimension(Dimension dimension){
		super.setPreferredSize(dimension);
	}
	public void setIcon(Icon icon){
		super.setIcon(icon);
	}
	public String getText(){
		return super.getText();
	}
	public Dimension getDimension(){
		return super.getPreferredSize();
	}
	public Icon getIcon(){
		return super.getIcon();
	}
}	
